package com.qzsoft.zhjd.machine.modules.machinemaintain.entity;

import javax.validation.constraints.NotBlank;

import org.hibernate.validator.constraints.Length;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.qzsoft.jeemis.common.validator.group.AddGroup;
import com.qzsoft.jeemis.common.validator.group.UpdateGroup;

import lombok.*;

/**
 * @author HuXiuMing
 * @date 2021/10/26 10:33
 */

@Data
@EqualsAndHashCode(callSuper = false)
@NoArgsConstructor
@AllArgsConstructor
@Builder
@ToString
@TableName("machine_maintain_img")
public class MachineMaintainImgEntity {

    /**
     * 主键
     */
    @TableId(type = IdType.ASSIGN_UUID)
    private String id;

    /**
     * 保养主键
     */
    private String maintainId;

    /**
     * 图片地址
     */
    @NotBlank(groups = { AddGroup.class, UpdateGroup.class }, message = "图片不可为空")
    private String path;

    /**
     * 图片信息描述
     */
    @NotBlank(groups = { AddGroup.class, UpdateGroup.class }, message = "图片描述不可为空")
    @Length(groups = { AddGroup.class, UpdateGroup.class }, max = 20, message = "图片描述不可超过{max}个字")
    private String info;
}
